<%@ page import="JurisPro.modelo.Processo"%>
<jsp:include page="static/cabecalhoAdv.jsp"/>


 <jsp:useBean id="meusProcessos" type="java.util.List<JurisPro.modelo.Processo>" scope="request" />
  <jsp:useBean id="processos" type="java.util.List<JurisPro.modelo.Processo>" scope="request" />
 
  <tr align="center" valign="top" bgcolor="#EEEEEE">
   <td colspan="7" bordercolor="#E5E5E5" bgcolor="#E5E5E5"><table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
       <td class="arvore"><a href="/JurisPro/go_to?pagina=inicio">In&iacute;cio</a> --&gt; Processos</td>
     </tr>
   </table>
     <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CDCDCD">
     
     <tr>
       <td width="620" height="39" class="topicos">Meus Processos<br /></td>
     </tr>
   </table>
   
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <td>&nbsp;</td>
       </tr>
     </table>
     
     <%if (meusProcessos.size()!=0){ %>
     <table width="84%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="tabela">
       <tr class="sub">
         <td width="134" height="30">N&ordm; do Processo</td>
         <td width="183" height="30">Autor</td>
         <td width="176" height="30">Parte</td>
         <td height="30" colspan="2">Op&ccedil;&otilde;es</td>
       </tr>
       
   
       <% String c1 = "#E5E5E5"; String c2 = "#f3f3f3"; int c3 = 1; %>
       <% 
       for(Processo processo : meusProcessos){
    	   %>  
    	 <tr bgcolor="<% if(c3 == 1) { c3 = 2; out.print(c1); } else { c3 = 1; out.print(c2); } %>" class="texto">
         
         <td><%= processo.getNumProcesso()%></td>
         <% if(processo.getCliente()){    %>
         <td><%= processo.getAutor()%> (Cliente)</td>
          <td><%= processo.getParte()%></td>
         <% }else {    %>
         <td><%= processo.getAutor()%></td>
         <td><%= processo.getParte()%> (Cliente)</td>
         <% } %>
        <td width="77" height="26"><a href="/JurisPro/go_to?pagina=detalhar&num=<%=processo.getNumProcesso()%>" class="link">Detalhar</a></td>
         <td width="79"><a href="/JurisPro/go_to?pagina=repassar&num=<%=processo.getNumProcesso()%>" class="link">Repassar</a></td>
       </tr>      	   
      <% }       %>
      
     </table>
     <%} %>
     
     <table width="84%" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <td height="30" class="novo">Cadastrar Novo Processo&nbsp;&nbsp;</td>
         <td width="32" height="32" class="novo"><a class='iframe' href="/JurisPro/go_to?pagina=cad_processo"><img src="images/add.gif" width="32" height="32" border="0" /></a></td>
       </tr>
     </table>
     
     <p>&nbsp;</p>
     <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CDCDCD">
       <tr>
         <td width="620" height="39" class="topicos">Pesquisar Processos<br /></td>
       </tr>
     </table>
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <td>&nbsp;</td>
       </tr>
     </table>
     
     <table width="71%" border="0" cellpadding="0" cellspacing="0" class="tabela">
       
       <form id="form1" name="form1" method="post" action="/JurisPro/do_it?">
       <tr>
         <td width="6%">   
         <input name="comando" type="hidden" id="textfield" value="pesq_processo" />
          </td>
         <td width="24%"><div align="left" class="texto">N&ordm; do Processo:</div></td>
         <td width="70%" height="30" colspan="2">
             <input name="pesqNum" type="text" id="textfield" size="60" />  </td>
       </tr>
       <tr>
         <td> 
              </td>
         <td><div align="left" class="texto">Nome do Autor:</div></td>
         <td height="30" colspan="2">
           <label>
           <input name="pesqAutor" type="text" id="textfield2" size="60" />
           </label>
                 </td>
       </tr>
       <tr>
         <td>
           
                  </td>
         <td><div align="left" class="texto">Nome da Parte:</div></td>
         <td height="30" colspan="2">
           <label>
           <input name="pesqParte" type="text" id="textfield3" size="60" />
           </label>
                 </td>
       </tr>
       <tr>
         <td>&nbsp;</td>
         <td>&nbsp;</td>
         <td>
           <label>
           <input type="submit" name="button" id="button" value="Pesquisar" />
           </label>
           <input type="reset" name="button2" id="button2" value="Limpar" />
         </form>         </td>        
       </tr>
     </table>
   <%if (processos.size()!=0) {%>
    <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="tabela">
       <tr class="sub">
         <td width="134" height="30">N&ordm; do Processo</td>
         <td width="150" height="30">Autor</td>
         <td width="150" height="30">Parte</td>
         <td width="150" height="30">Respons&aacute;vel</td>
         <td height="40" colspan="2">Op&ccedil;&otilde;es</td>
       </tr>
       
       <% String cc1 = "#E5E5E5"; String cc2 = "#f3f3f3"; int cc3 = 1; %>
       <% 
       for(Processo processo : processos){
    	   %>  
    	 <tr bgcolor="<% if(cc3 == 1) { cc3 = 2; out.print(cc1); } else { cc3 = 1; out.print(cc2); } %>" class="texto">
         
         <td><%= processo.getNumProcesso()%></td>
         <% if(processo.getCliente()){    %>
         <td><%= processo.getAutor()%> (Cliente)</td>
         <td><%= processo.getParte()%></td>
         <% }else {    %>
         <td><%= processo.getAutor()%></td>
          <td><%= processo.getParte()%> (Cliente)</td>
         <%} %>     
         
         <td><%= processo.getNomeResponsavel()%></td>
             
         <td height="26"><a href="/JurisPro/go_to?pagina=detalhar&num=<%=processo.getNumProcesso()%>" class="link">Detalhar</a></td>
       </tr>      	   
      <% }       %>
       
     </table>
     <%} %>
      <p>&nbsp;</p>
  </tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><jsp:include page="static/rodape.jsp"/>